import {Http} from '../utils/http'

class Login {
    static async onLogin(code, uname, avatar) {
        const res = await Http.request({
            url: `user/login`,
            data: {
                code,
                uname,
                avatar
            }
        })
        wx.setStorageSync('authorization', res.data.authorization)
    }
}

export {Login}
